#ifndef GAMEINIT_H
#define GAMEINIT_H

#include <QFrame>
#include <QTimer>
#include "datamodel.h"

namespace Ui {
class GameInit;
}

class GameInit : public QFrame
{
    Q_OBJECT
    
public:
    explicit GameInit(QWidget *parent = 0);
    explicit GameInit(DataModel *model,QWidget *parent = 0);
    ~GameInit();
    void setupUi();
signals:
    void changeLock(bool b);
    void changeItem();
    void resetUi();
    void syncGameSI(const int &id);
private slots:

    void on_btn_clienRunGame_clicked();

    void on_btn_initComplete_clicked();

    void on_btn_sync_clicked();

    void on_btn_startInit_clicked();

    void initTimerCallBack();

    void on_btn_initEnd_clicked();

    void on_btn_cancelInit_clicked();

private:
    Ui::GameInit *ui;
    DataModel *model;
    QTimer *initTimer;
    int tempInitSize;
};

#endif // GAMEINIT_H
